<?php

use yii\db\Migration;
use yii\db\Schema;

class m170123_090510_ADD_CLOUMN_TEMPLATE_FIELD extends Migration
{
    public function up()
    {

         $this->addColumn('{{template}}', 'nocost', Schema::TYPE_TEXT. " NULL COMMENT '费用不包含' ");
         $this->addColumn('{{template}}', 'cancel', Schema::TYPE_TEXT. " NULL COMMENT '取消政策' ");
         $this->addColumn('{{template}}', 'discount', Schema::TYPE_TEXT. " NULL COMMENT '优惠说明' ");



         $this->addColumn('{{product}}', 'nocost', Schema::TYPE_TEXT. " NULL COMMENT '费用不包含' ");
         $this->addColumn('{{product}}', 'cancel', Schema::TYPE_TEXT. " NULL COMMENT '取消政策' ");
         $this->addColumn('{{product}}', 'discount', Schema::TYPE_TEXT. " NULL COMMENT '优惠说明' ");
    }

    public function down()
    {
        echo "m170123_090510_ADD_CLOUMN_TEMPLATE_FIELD cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
